



class Center extends React.Component {

	constructor() {
		super();
		this.state={
			 width:0
		}
	}
    componentDidMount() {
        window.addEventListener('resize', this.onWindowResize);
        this.onWindowResize()
	}
	componentWillUnmount() {
	    window.removeEventListener('resize', this.onWindowResize)
	}
    onWindowResize=(e)=>{
    	 let winWidth;
    	 if (window.innerWidth)
			winWidth = window.innerWidth;
		 else if ((document.body) && (document.body.clientWidth))
			winWidth = document.body.clientWidth;
    	 if(winWidth<=1460){
           this.setState({
           	  width:1
           })
    	}
    	else
    	{
    		this.setState({
           	  width:0
           })
    	}
    }
	render() {

		return (
			<div>
				       {this.props.children}
				       
			</div>
		)

	}

}

export default  Center;